<%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>出错啦</title>
	<style type="text/css">
		
		h1,h3{
			margin-bottom: 10px;
			font-family: inherit;
			line-height: 1.1;
			color: inherit;
		}
		h1{ 
			font-size: 100px; 
			font-weight: 100;
			margin-top: 10px;
		}
		.font-bold{
			font-weight: 600;
			font-size: 16px;
		}
		.text-center{text-align: center;}
		.error_div{
			text-align: left;
			padding: 10px;
			font-size: 12px;
    		font-family: Verdana, Arial, Helvetica, AppleGothic, sans-serif;
			display: none;
		}
		.up,.down{
			height: 0px;
		    width: 0px;
			margin:0 auto;
		}
		.up,.down:HOVER{
			cursor: pointer;
		}
		.up{
		    border-bottom: 6px solid #95B8E7;
		    border-top: 0px;
		    border-left: 6px solid #fff;
		    border-right: 6px solid #fff;
		    margin-top: -6px
		}
		.down{
		    border-top: 6px solid #95B8E7;
		    border-bottom: 0px;
		    border-left: 6px solid #fff;
		    border-right: 6px solid #fff;}
		.error_img{
			margin:0 auto;
			height:160px;
			width:245px;
			background:url("../images/error/500.png");
		}
	</style>
</head>
<body>
	<div class="text-center">
		<div class="error_img"></div>
		<h3 class="font-bold">服务器内部错误，服务器好像出错了...</h3>
		<div style="margin-top: 20px;">
			<div id="up" title="收起"></div>
			<div style="border-top: 1px solid #95B8E7;"></div>
			<div class="error_div">
				<%  Exception exc = (Exception)request.getAttribute("exception");
					if(exc != null){
						out.print(exc + "<br/>");
						for (StackTraceElement stackTraceElement:exc.getStackTrace()){
							out.print(stackTraceElement.toString()+"<br/>");
						}
					}
				%>
			</div>
			<div id="down" class="down" title="展开"></div>
		</div>
	</div>
</body>
<script type="text/javascript" src="${pageContext.request.contextPath}/script/jquery.min.js"></script>
<script type="text/javascript">
	$("#down").click(function(){
		$(this).removeClass("down");
		$("#up").addClass("up");
		$(".error_div").css("display", "block");
	});
	$("#up").click(function(){
		$(this).removeClass("up");
		$("#down").addClass("down");
		$(".error_div").css("display", "none");
	});
</script>
</html>
 